@echo off
setlocal

if not exist vld-2.5.1 (
    PowerShell -Command "Expand-Archive vld-2.5.1.zip ."
)
cd vld-2.5.1

rem 创建输出目录
if not exist ..\lib mkdir ..\lib
if not exist ..\lib\x64 mkdir ..\lib\x64
if not exist ..\lib\Win32 mkdir ..\lib\Win32
if not exist ..\lib\x64\Debug mkdir ..\lib\x64\Debug
if not exist ..\lib\x64\Release mkdir ..\lib\\Release
if not exist ..\lib\Win32\Debug mkdir ..\lib\Win32\Debug
if not exist ..\lib\Win32\Release mkdir ..\lib\Win32\Release
if not exist ..\include mkdir ..\include


rem 复制头文件
copy ".\include\vld.h" ..\include\vld.h
copy ".\include\vld_def.h" ..\include\vld_def.h

rem 复制lib文件
copy ".\lib\Win32\vld.lib" ..\lib\Win32\Release
copy ".\lib\Win32\vld.lib" ..\lib\Win32\Debug
copy ".\lib\Win64\vld.lib" ..\lib\x64\Release
copy ".\lib\Win64\vld.lib" ..\lib\x64\Debug

rem 复制dll文件
copy ".\bin\Win32\vld_x86.dll" ..\lib\Win32\Release
copy ".\bin\Win32\dbghelp.dll" ..\lib\Win32\Release
copy ".\bin\Win32\Microsoft.DTfW.DHL.manifest" ..\lib\Win32\Release
copy ".\bin\Win32\vld_x86.dll" ..\lib\Win32\Debug
copy ".\bin\Win32\dbghelp.dll" ..\lib\Win32\Debug
copy ".\bin\Win32\Microsoft.DTfW.DHL.manifest" ..\lib\Win32\Debug
copy ".\bin\Win64\vld_x64.dll" ..\lib\x64\Release
copy ".\bin\Win64\dbghelp.dll" ..\lib\x64\Release
copy ".\bin\Win64\Microsoft.DTfW.DHL.manifest" ..\lib\x64\Release
copy ".\bin\Win64\vld_x64.dll" ..\lib\x64\Debug
copy ".\bin\Win64\dbghelp.dll" ..\lib\x64\Debug
copy ".\bin\Win64\Microsoft.DTfW.DHL.manifest" ..\lib\x64\Debug

rem 复制pdb文件
copy ".\bin\Win32\vld_x86.pdb" ..\lib\Win32\Debug
copy ".\bin\Win64\vld_x64.pdb" ..\lib\x64\Debug

rem 复制ini文件
copy ".\vld.ini" ..\lib\Win32\Release
copy ".\vld.ini" ..\lib\Win32\Debug
copy ".\vld.ini" ..\lib\x64\Release
copy ".\vld.ini" ..\lib\x64\Debug

cd ..